package cn.edu.lzu.service.impl;


import cn.edu.lzu.dao.CityMapper;
import cn.edu.lzu.entity.City;
import cn.edu.lzu.service.CityService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Service
@Transactional
public class CityServiceImpl implements CityService {
    @Resource
    private CityMapper cityMapper;

    @Override
    public List<City> selectAllProvince() {
        return cityMapper.selAllProvince();
    }

    @Override
    public List<City> selectAllCityByProvinceId(long provinceId) {
        return cityMapper.selAllCityByProvinceId(provinceId);
    }

    @Override
    public List<City> selectAllCountyByCityId(long cityId) {
        return cityMapper.selAllCountyByCityId(cityId);
    }

    @Override
    public City selectSpecificCityById(long id) {
        return cityMapper.selSpecificCityById(id);
    }
}
